#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：prod_ctrl_service 
@File    ：slitting_handler.py
@IDE     ：PyCharm 
@Author  ：孔令伟
@Date    ：9/9/24 3:41 PM 
"""
from mg_app_framework import HttpBasicHandler
from common.log_decorator import log_decorator
from common.params_check_decorator import params_check_decorator
from prod_ctrl_service.service.production_process.output_lot import check_output_lot


class OutLotWipHandler(HttpBasicHandler):
    @log_decorator()
    @params_check_decorator(check_params=["trace_id", "call_id", "upperpc_code", "process_code"])
    async def post_process(self, *args, **kwargs):
        params: dict = self.data
        result = await check_output_lot(params=params)
        self.send_response_data(result["code"], result["data"], result["info"])
